From e747ec3ea02dd01e9ffa9e398e24e6939a5b738c Mon Sep 17 00:00:00 2001
From: Sebastien Castiel <sebastien@castiel.me>
Date: Wed, 6 Dec 2023 17:47:41 -0500
Subject: Tabs

---
 src/app/groups/[groupId]/layout.tsx | 20 +++++++++-----------
 1 file changed, 9 insertions(+), 11 deletions(-)

(limited to 'src/app/groups/[groupId]/layout.tsx')

diff --git a/src/app/groups/[groupId]/layout.tsx b/src/app/groups/[groupId]/layout.tsx
index 5c835f5..5b99dd2 100644
--- a/src/app/groups/[groupId]/layout.tsx
+++ b/src/app/groups/[groupId]/layout.tsx
@@ -1,6 +1,8 @@
+import { GroupTabs } from '@/app/groups/[groupId]/group-tabs'
+import { SaveGroupLocally } from '@/app/groups/[groupId]/save-recent-group'
 import { Button } from '@/components/ui/button'
 import { getGroup } from '@/lib/api'
-import { ChevronLeft, Edit } from 'lucide-react'
+import { ChevronLeft } from 'lucide-react'
 import Link from 'next/link'
 import { notFound } from 'next/navigation'
 import { PropsWithChildren } from 'react'
@@ -24,19 +26,15 @@ export default async function GroupLayout({
         </Button>
       </div>
 
-      <div className="flex justify-between items-baseline mb-4">
-        <h1 className="font-bold text-2xl">
-          <Link href={`/groups/${groupId}`}>{group.name}</Link>
-        </h1>
+      <h1 className="font-bold text-2xl mb-4">
+        <Link href={`/groups/${groupId}`}>{group.name}</Link>
+      </h1>
 
-        <Button variant="outline" asChild size="icon">
-          <Link href={`/groups/${groupId}/edit`}>
-            <Edit className="w-4 h-4" />
-          </Link>
-        </Button>
-      </div>
+      <GroupTabs groupId={groupId} />
 
       {children}
+
+      <SaveGroupLocally group={{ id: group.id, name: group.name }} />
     </>
   )
 }
-- 
cgit v1.3

